package com.ruoyi.waterPrice.service;

import com.ruoyi.common.core.domain.base.datam.MiMainchanB;
import com.ruoyi.common.core.domain.business.waterPrice.WiFarmacctY;
import com.ruoyi.common.core.domain.business.waterPrice.WiFarmfeeY;
import org.springframework.web.multipart.MultipartFile;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * 农户水费台账登记Service接口
 * 
 * @author ps
 * @date 2023-02-17
 */
public interface IWiFarmacctYService 
{
    /**
     * 查询农户水费台账登记
     * 
     * @param feeYr 农户水费台账登记主键
     * @return 农户水费台账登记
     */
    public WiFarmacctY selectWiFarmacctYByFeeYrAndFarmCd(String feeYr,String farmCd);

    /**
     * 查询农户水费台账登记列表
     * 
     * @param wiFarmacctY 农户水费台账登记
     * @return 农户水费台账登记集合
     */
    public List<WiFarmacctY> selectWiFarmacctYList(WiFarmacctY wiFarmacctY);

    /**
     * 新增农户水费台账登记
     * 
     * @param wiFarmacctY 农户水费台账登记
     * @return 结果
     */
    public int insertWiFarmacctY(WiFarmacctY wiFarmacctY);

    /**
     * 修改农户水费台账登记
     * 
     * @param wiFarmacctY 农户水费台账登记
     * @return 结果
     */
    public int updateWiFarmacctY(WiFarmacctY wiFarmacctY);

    /**
     * 批量删除农户水费台账登记
     * 
     * @param feeYrs 需要删除的农户水费台账登记主键集合
     * @return 结果
     */
    public int deleteWiFarmacctYByFeeYrs(String[] feeYrs);

    /**
     * 删除农户水费台账登记信息
     * 
     * @param feeYr 农户水费台账登记主键
     * @return 结果
     */
    public int deleteWiFarmacctYByFeeYr(String feeYr);

    /**
     * 农户水费收缴
     * @param wiFarmacctY
     * @return
     */
    int payFarmFee(WiFarmacctY wiFarmacctY) throws Exception;

    /**
     * 农户当年收缴分析
     * @param year
     * @param orgCd
     * @return
     */
    List<WiFarmacctY> farmFeeIncomeAnalys(String year, String orgCd);

    /**
     * 文件上传接口
     *
     * @param file 上传的文件
     * @return 访问地址
     * @throws Exception
     */
    String uploadFile(MultipartFile file) throws Exception;

    /**
     * 获取渠道下水费收缴情况
     * @param mainCd
     */
    ArrayList<HashMap<String, Object>> getFeeInfoByChan(String mainCd);

    List<MiMainchanB> selectChanCds(String mainCd);

    List<HashMap<String, String>> getFarmCdsByChanCd(String chanCdQuery);
}
